import {
  getRequest,
  postRequest,
  putRequest,
  deleteRequest
} from '../utils/request'

export const requestResourceById = params => {
  return getRequest('/permissions/' + params)
}

export const requestResourceAll = params => {
  return getRequest('/permissions/allMenu')
}

export const requestSaveResource = params => {
  return postRequest('/permissions', params)
}

export const requestUpdateResource = params => {
  return putRequest('/permissions', params)
}

export const requestDelResourceById = params => {
  return deleteRequest('/permissions/' + params)
}
